import Vue from 'vue'
import Vuex from 'vuex'

import { sysChapterMarkAdd } from '@/api/admin/courseLibrary/sysChapterMark'

Vue.use(Vuex)

const state = {}

const getters = {}

const actions = {
  async addSysChapterMark({ commit }, data) {
    let res = await sysChapterMarkAdd(data)
    return res.data.code == 0 ? res.data : Promise.reject(new Error('faile'))
  },
}

const mutations = {}

export default {
  state,
  getters,
  actions,
  mutations,
}
